package cn.openea.perpartner.meily.eventlistener.event;

import cn.openea.perpartner.meily.web.entity.dto.LogisticsDTOFactory;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * @author ysk
 * @version 1.0.1
 * @Description 同步物流信息
 * @createTime 2023年05月10日 18:17:00
 */
@Getter
public class SyncLogisticsEvent extends ApplicationEvent {


    /**
     * 实体类
     */
    private Object object;

    /**
     * 物流信息
     */
    private LogisticsDTOFactory.LogisticsRealTimeDTO realTimeDTO;

    /**
     * id 如果是更新需要传递 新增不需要
     */
    private String logisticsId;

    public SyncLogisticsEvent(Object source, Object object, LogisticsDTOFactory.LogisticsRealTimeDTO realTimeDTO, String logisticsId) {
        super(source);
        this.object = object;
        this.realTimeDTO = realTimeDTO;
        this.logisticsId = logisticsId;
    }

    public SyncLogisticsEvent(Object source, Object object) {
        super(source);
        this.object = object;
    }
}
